package ui;

import java.util.Observable;
import java.util.Observer;

import messageprocessors.clients.Terminal;

public class TerminalUI  implements Observer{
	public Terminal client;
	public TerminalGuiAdmin gui;
	public TerminalGui usergui;
	
	public TerminalUI(int auswahl,String clientid,String clientpw){
		if (auswahl==0){
			client=new Terminal(clientid,clientpw);
			client.addObserver(this);
			gui=new TerminalGuiAdmin();
			gui.setLocationRelativeTo(null);
			gui.setVisible(true);
			System.out.println("hier");
	
		}else if(auswahl==1){
			client=new Terminal(clientid,clientpw);
			client.addObserver(this);
			usergui=new TerminalGui();
			gui.setLocationRelativeTo(null);
			
			usergui.setVisible(true);
			System.out.println("hier");
	
		}
		
		//try{
		//	client.connect();	
		//} catch (Exception e){
		//	e.printStackTrace();
		//}
		
	}
	


	@Override
	public void update(Observable arg0, Object arg1) {
		// TODO Auto-generated method stub
		
	}

}
